build: Remove sassc option
authorBenjamin Otte <otte@redhat.com>
Thu, 1 Apr 2021 19:29:41 +0000 (21:29 +0200)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 20 Jul 2021 18:00:25 +0000 (14:00 -0400)
Instead, ensure that sassc is made madatory on git builds (because
it is, we don't ship CSS files anymore) and not even looked for in
release builds (because do ship CSS files there).

gtk/meson.build
meson.build
meson_options.txt

index b42d793c86363be025f4e5be409efbd9f9c88f93..bf108df11a1cecdd638347694736ddd580b9fc7a 100644 (file)
@@ -839,23 +839,25 @@ gtk_gresources_xml = configure_file(output: 'gtk.gresources.xml',
   ],
 )
 
-# Build the theme files
-sassc = find_program('sassc', required: false)
-if not sassc.found() and not get_option('sassc').disabled()
-  subproject('sassc')
-  sassc = find_program('sassc', required: get_option('sassc').enabled())
-endif
+theme_deps = []
+# For git checkouts, but not for tarballs...
+if not fs.exists('theme/Adwaita/Adwaita.css')
+  # ... build the theme files
+  sassc = find_program('sassc', required: false)
+  if not sassc.found()
+    subproject('sassc')
+    sassc = find_program('sassc', required: true)
+  endif
 
-if sassc.found()
-  sassc_opts = [ '-a', '-M', '-t', 'compact' ]
+  if sassc.found()
+    sassc_opts = [ '-a', '-M', '-t', 'compact' ]
 
-  subdir('theme/Default')
+    subdir('theme/Default')
 
-  theme_deps = [
-    default_theme_deps,
-  ]
-else
-  theme_deps = []
+    theme_deps += [
+      default_theme_deps,
+    ]
+  endif
 endif
 
 gtkresources = gnome.compile_resources('gtkresources',
index 1b5740a53cb8ae20a4d91d05939baef4f0e1b0e5..10665b855daea011f2b93315288b0eec8f3c249d 100644 (file)
@@ -24,6 +24,7 @@ cloudproviders_req = '>= 0.3.1'
 xkbcommon_req      = '>= 0.2.0'
 sysprof_req        = '>= 3.38.0'
 
+fs = import('fs')
 gnome = import('gnome')
 pkg_config = import('pkgconfig')
 
index 3a471a2025411e370f750de1aab01458dade0ba4..29d186203195135ad4c7193fc7ee9ef851cbc4a3 100644 (file)
@@ -78,11 +78,6 @@ option('colord',
        value: 'disabled',
        description : 'Build colord support for the CUPS printing backend')
 
-option('sassc',
-       type: 'feature',
-       value: 'auto',
-       description: 'Rebuild themes using sassc')
-
 option('f16c',
        type: 'feature',
        value: 'enabled',